#ifndef GPUFRAMEWORK_H
#define GPUFRAMEWORK_H

#include <glew.h>
#include <glut.h>
#include <Cg/cgGL.h>

#pragma comment( lib,"glew32.lib" )
#pragma comment( lib,"cg.lib" )
#pragma comment( lib,"cgGL.lib" )

typedef struct
{
	GLenum target;
	GLenum internalFormat;
	GLenum format;
}texInfo;

GLuint glInitial(int* argc, char **argv);
void createFBO(GLuint* fb);
void configureCullingSpace(int width,int height);
void createTexture(GLuint* tID,int width,int height,texInfo* tex);
void sendTexture(int width,int height,texInfo* tex,float* data);
void cgInitial(CGcontext* cgContext,CGprofile* fragmentProfile,CGprogram* fragmentProgram,char* sourceFile);
void cgParamInitial(CGparameter* data,char* paramName,CGprogram* fragmentProgram);
void bufferInitial(GLuint* tID,texInfo* tex,CGprofile* fragmentProfile,CGprogram* fragmentProgram);
void cgTexParamConfigure(GLuint* tID,CGparameter* data);
void triggerGPUComputation(int width,int height);
void readBuffer(int width,int height,texInfo* tex,float*data);
void cgRelease(CGcontext* cgContext,CGprogram* fragmentProgram);
void FBORelease(GLuint* fb);
void textureRelease(GLuint* tID);
void glRelease(GLuint* window);


#endif
